using System;
using System.Collections.Generic;
using System.Text;
using System.Data.OracleClient;

namespace Midapex.SmartOrm.Provider
{
    class OracleSession:OrmSession
    {
        public OracleSession(string dbConnection)
        {
            this.dbConnString = dbConnection;
        }

        public override System.Data.Common.DbConnection CreateDbConnection()
        {
            return new OracleConnection(this.dbConnString);
        }

        public override System.Data.Common.DbCommand CreateDbCommand(string sql)
        {
            return new OracleCommand(sql);
        }
        /*
        protected override string TableExistCommand(Table table)
        {
            return string.Format("SELECT COUNT(*) IN ALL_TABLES where table_name='{0}')", table.Name);
        }
        */
        protected override string ColumnStatement(Column col)
        {
            throw new Exception("The method or operation is not implemented.");
        }
    }
}
